<template>
	<view>
		<!-- 短剧资讯 -->
		<view @click="jumpDetail(item._id)" class="News_box" v-for="(item,index) in News" :key="index">
			<image class="News_image" :src="item.image"></image>
			<view class="News_title">{{item.title}}</view>
		</view>
		
		<view class="bannerads">
			<!-- bannaer广告，30秒刷新一次 -->
			<ad :unit-id="wxad_id" ad-intervals="30"></ad>
		</view>
	</view>
</template>

<script>
	export default {
		name: "newslist",
		props: ['News'],
		data() {
			return {
				wxad_id:"adunit-9c5208b2c05b38e0"
			};
		},
		onInit() {
			
		},
		methods: {
			jumpDetail(id) {
				uni.navigateTo({
					url: '/pages_sub/detail/detail?id=' + id
				})
			},
		}
	}
</script>

<style>
	.bannerads{
		width: 100%;
		position: fixed;
		bottom: 0rpx;
	}
	/* 短剧资讯 */
	.News_box {
		margin-top: 20rpx;
		display: flex;
		justify-content: space-evenly;
		align-items: center;
	}

	.News_image {
		width: 340rpx;
		height: 200rpx;
		border-radius: 10rpx;
	}

	.News_title {
		width: 330rpx;
		font-size: 30rpx;
		/* font-weight: 300; */
		display: -webkit-box;
		overflow: hidden;
		white-space: normal !important;
		text-overflow: ellipsis;
		word-wrap: break-word;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
	}
</style>
